return {
    'nvim-treesitter/nvim-treesitter',
    build = ':TSUpdate',
    event = { "BufReadPost", "BufNewFile" },
    opts = {
        sync_install = false,
        highlight = {
            enable = true,
            -- 文件过大的将不处理
            disable = function(lang, buf)
                -- 针对文件类型不启用
                local disabled_langs = {"json", "xml"}
                for _, l in ipairs(disabled_langs) do
                    if lang == l then
                        return true
                    end
                end

                -- 针对文件大小不启用
                local max_filesize = 100 * 1024 -- 100 KB
                local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
                if ok and stats and stats.size > max_filesize then
                    return true
                end
            end,
            additional_vim_regex_highlighting = false,
        },
        rainbow = {
            enable = true,
            disable = {"json", "xml"},
            extended_mode = true,
            max_file_lines = 10000,
        }
    },
    config = function(_, opts)
        require('nvim-treesitter.configs').setup(opts)
        -- 注册一些关联文件类型
        vim.filetype.add({
            extension = {
                ets = 'ets',
            }
        })
        vim.treesitter.language.register('typescript', 'ets')
    end,
}
